<%@page import = "clothing.database.EmployeeManager" %>
<%
	String firstname = request.getParameter("firstname");
String mi = request.getParameter("mi");
String lastname = request.getParameter("lastname");

String  username = request.getParameter("username");

String password1 = request.getParameter("password1");
String password2 = request.getParameter("password2");

String address = request.getParameter("address");
String phone = request.getParameter("phone");


if(password1.equals(password2))
{
	EmployeeManager uh = new EmployeeManager();
	uh.insertUser(firstname, mi, lastname, username, password1, address, phone);
%>
	
	
	<%@ include file = "templates/header.jsp" %>

<h3> You have signed up successfully</h3>

<%@ include file = "templates/footer.jsp" %>
	
	<%
	
}
else
{
	System.out.println("REDIRECTING");
	
	RequestDispatcher rd = request.getRequestDispatcher("signup.jsp?errorID=1");
	rd.forward(request,response);
}
%>